Sorry to bother you again.
// Start to buid GUI
if(canInit()){
// Creation of Buttons and function associated to 'close'
prevButton = apply(verEvidenceBox, "<<&Previous Req", selectPrev)
nextButton = apply(verEvidenceBox, "&Next Req>>", selectNext)
saveButton = apply(verEvidenceBox, "&Save Module", saveReport)
close(verEvidenceBox, true, closeBox)
// Shows Proposed Checker, Tag and Requirement
tagField = field(verEvidenceBox, "Tag:", identifier(obj), 20, true)
sigdescrField = field(verEvidenceBox, "Signal Description:", obj."Signal Description" "", 20, true)
resulField = field(verEvidenceBox, "Resolution:", obj."Resolution" "", 20, true)
richTextReq = field(verEvidenceBox, "Signal Name", obj."Object Text" "" , 20, true)
dtmaxField = field(verEvidenceBox, "Dt Max:", obj."Data Max" "", 20, true)
dtminField = field(verEvidenceBox, "Dt Min:", obj."Data Min" "", 20, true)
dtvmaxField = field(verEvidenceBox, "Dt Valid Max", obj."Data Valid Max" "" , 20, true)
dtvminField = field(verEvidenceBox, "Dt Valid Min", obj."Data Valid Min" "" , 20, true)
tagField->"top"->"flush"
tagField->"left"->"flush"
tagField->"bottom"->"unattached"->dtmaxField
richTextReq->"left"->"flush"->tagField
richTextReq->"top"->"aligned"->tagField
richTextReq->"bottom"->"unattached"->dtminField
sigdescrField->"left"->"flush"->richTextReq
sigdescrField->"top"->"aligned"->richTextReq
sigdescrField->"bottom"->"unattached"->dtvmaxField
resulField->"left"->"flush"->sigdescrField
resulField->"top"->"aligned"->sigdescrField
resulField->"bottom"->"unattached"->dtvminField
resulField->"right"->"unattached"
dtmaxField->"top"->"spaced"->tagField
dtmaxField->"left"->"aligned"->tagField
dtmaxField->"bottom"->"spaced"
dtminField->"left"->"flush"->dtmaxField
dtminField->"top"->"spaced"->richTextReq
dtminField->"bottom"->"spaced"
dtvmaxField->"left"->"flush"->dtminField
dtvmaxField->"top"->"spaced"->sigdescrField
dtvmaxField->"bottom"->"spaced"
dtvminField->"left"->"flush"->dtvmaxField
dtvminField->"top"->"spaced"->resulField
dtvminField->"bottom"->"spaced"
dtvminField->"right"->"unattached"
// Questions
selectChoiceQ1 = choice(verEvidenceBox, "Q1:?", options, 1, 13,false)
DBE t1 = button(verEvidenceBox, "Show Details", selectDetails1)
t1 -> "left" -> "flush" -> selectChoiceQ1
t1 -> "top" -> "aligned" -> selectChoiceQ1
selectChoiceQ2 = choice(verEvidenceBox, "Q2:?", options, 1, 13,false)
t2 = button(verEvidenceBox, "Show Details", selectDetails2)
t2 -> "left" -> "flush" -> selectChoiceQ2
t2 -> "top" -> "aligned" -> selectChoiceQ2
selectChoiceQ3 = choice(verEvidenceBox, "Q3:", options, 1, 13,false)
t3 = button(verEvidenceBox, "Show Details", selectDetails3)
t3 -> "left" -> "flush" -> selectChoiceQ3
t3 -> "top" -> "aligned" -> selectChoiceQ3
statusField = field(verEvidenceBox, "Status", "", 13, true)
updateVariables()
show verEvidenceBox
}
Bruwbruw - Tue Aug 07 10:05:13 EDT 2012 |
Re: Problem with DBE placement
There is some written and some unwritten rules and some guidelines with constrained placement:
DB verEvidenceBox = centered "Test"
void selectPrev(DB) {}
void selectNext(DB) {}
void saveReport(DB) {}
DBE prevButton
DBE nextButton
DBE saveButton
DBE tagField
DBE richTextReq
DBE sigdescrField
DBE resulField
DBE dtmaxField
DBE dtminField
DBE dtvmaxField
DBE dtvminField
prevButton = apply(verEvidenceBox, "<<&Previous Req", selectPrev)
nextButton = apply(verEvidenceBox, "&Next Req>>", selectNext)
saveButton = apply(verEvidenceBox, "&Save Module", saveReport)
// close(verEvidenceBox, true, closeBox)
// Shows Proposed Checker, Tag and Requirement
tagField = field(verEvidenceBox, "Tag:", "", 20, true)
tagField->"top"->"form" // to attach to the form use 'form', not 'flush'
tagField->"left"->"form"
tagField->"bottom"->"unattached" // <<- unattached does not go with a value
// Declare fields in the order on the screen from top left. Place them immediately
richTextReq = field(verEvidenceBox, "Signal Name", "" , 20, true)
richTextReq->"left"->"flush"->tagField
// instead of aligned use the same value as the other field
// so insteadof 'richTextReq->"top"->"aligned"->tagField' do
richTextReq->"top"->"form"
richTextReq->"bottom"->"unattached" // <<- unattached does not go with a value
sigdescrField = field(verEvidenceBox, "Signal Description:","" "", 20, true)
sigdescrField->"left"->"flush"->richTextReq
sigdescrField->"top"->"aligned"->richTextReq
sigdescrField->"bottom"->"unattached" // <<- unattached does not go with a value
resulField = field(verEvidenceBox, "Resolution:","" "", 20, true)
resulField->"left"->"flush"->sigdescrField
resulField->"top"->"aligned"->sigdescrField
resulField->"bottom"->"unattached"
resulField->"right"->"unattached" // <<- unattached does not go with a value
dtmaxField = field(verEvidenceBox, "Dt Max:", "", 20, true)
dtmaxField->"top"->"spaced"->tagField
dtmaxField->"left"->"aligned"->tagField
dtmaxField->"bottom"->"spaced"
dtminField = field(verEvidenceBox, "Dt Min:","", 20, true)
dtminField->"left"->"flush"->dtmaxField
dtminField->"top"->"spaced"->richTextReq
dtminField->"bottom"->"spaced"
dtvmaxField = field(verEvidenceBox, "Dt Valid Max","" , 20, true)
dtvmaxField->"left"->"flush"->dtminField
dtvmaxField->"top"->"spaced"->sigdescrField
dtvmaxField->"bottom"->"spaced"
dtvminField = field(verEvidenceBox, "Dt Valid Min", "" , 20, true)
dtvminField->"left"->"flush"->dtvmaxField
dtvminField->"top"->"spaced"->resulField
dtvminField->"bottom"->"spaced"
dtvminField->"right"->"unattached"
string options[] = {"Option 1", "Option 2", "Option 3" }
void selectDetails1(DBE) { }
void selectDetails2(DBE) { }
void selectDetails3(DBE) { }
// Questions
DBE selectChoiceQ1 = choice(verEvidenceBox, "Q1:?", options, 1, 13,false)
DBE t1 = button(verEvidenceBox, "Show Details", selectDetails1)
t1 -> "left" -> "flush" -> selectChoiceQ1
t1 -> "top" -> "aligned" -> selectChoiceQ1
DBE selectChoiceQ2 = choice(verEvidenceBox, "Q2:?", options, 1, 13,false)
DBE t2 = button(verEvidenceBox, "Show Details", selectDetails2)
t2 -> "left" -> "flush" -> selectChoiceQ2
t2 -> "top" -> "aligned" -> selectChoiceQ2
DBE selectChoiceQ3 = choice(verEvidenceBox, "Q3:", options, 1, 13,false)
DBE t3 = button(verEvidenceBox, "Show Details", selectDetails3)
t3 -> "left" -> "flush" -> selectChoiceQ3
t3 -> "top" -> "aligned" -> selectChoiceQ3
DBE statusField = field(verEvidenceBox, "Status", "", 13, true)
show verEvidenceBox
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Problem with DBE placement Mathias Mamsch - Tue Aug 07 10:26:38 EDT 2012
There is some written and some unwritten rules and some guidelines with constrained placement:
DB verEvidenceBox = centered "Test"
void selectPrev(DB) {}
void selectNext(DB) {}
void saveReport(DB) {}
DBE prevButton
DBE nextButton
DBE saveButton
DBE tagField
DBE richTextReq
DBE sigdescrField
DBE resulField
DBE dtmaxField
DBE dtminField
DBE dtvmaxField
DBE dtvminField
prevButton = apply(verEvidenceBox, "<<&Previous Req", selectPrev)
nextButton = apply(verEvidenceBox, "&Next Req>>", selectNext)
saveButton = apply(verEvidenceBox, "&Save Module", saveReport)
// close(verEvidenceBox, true, closeBox)
// Shows Proposed Checker, Tag and Requirement
tagField = field(verEvidenceBox, "Tag:", "", 20, true)
tagField->"top"->"form" // to attach to the form use 'form', not 'flush'
tagField->"left"->"form"
tagField->"bottom"->"unattached" // <<- unattached does not go with a value
// Declare fields in the order on the screen from top left. Place them immediately
richTextReq = field(verEvidenceBox, "Signal Name", "" , 20, true)
richTextReq->"left"->"flush"->tagField
// instead of aligned use the same value as the other field
// so insteadof 'richTextReq->"top"->"aligned"->tagField' do
richTextReq->"top"->"form"
richTextReq->"bottom"->"unattached" // <<- unattached does not go with a value
sigdescrField = field(verEvidenceBox, "Signal Description:","" "", 20, true)
sigdescrField->"left"->"flush"->richTextReq
sigdescrField->"top"->"aligned"->richTextReq
sigdescrField->"bottom"->"unattached" // <<- unattached does not go with a value
resulField = field(verEvidenceBox, "Resolution:","" "", 20, true)
resulField->"left"->"flush"->sigdescrField
resulField->"top"->"aligned"->sigdescrField
resulField->"bottom"->"unattached"
resulField->"right"->"unattached" // <<- unattached does not go with a value
dtmaxField = field(verEvidenceBox, "Dt Max:", "", 20, true)
dtmaxField->"top"->"spaced"->tagField
dtmaxField->"left"->"aligned"->tagField
dtmaxField->"bottom"->"spaced"
dtminField = field(verEvidenceBox, "Dt Min:","", 20, true)
dtminField->"left"->"flush"->dtmaxField
dtminField->"top"->"spaced"->richTextReq
dtminField->"bottom"->"spaced"
dtvmaxField = field(verEvidenceBox, "Dt Valid Max","" , 20, true)
dtvmaxField->"left"->"flush"->dtminField
dtvmaxField->"top"->"spaced"->sigdescrField
dtvmaxField->"bottom"->"spaced"
dtvminField = field(verEvidenceBox, "Dt Valid Min", "" , 20, true)
dtvminField->"left"->"flush"->dtvmaxField
dtvminField->"top"->"spaced"->resulField
dtvminField->"bottom"->"spaced"
dtvminField->"right"->"unattached"
string options[] = {"Option 1", "Option 2", "Option 3" }
void selectDetails1(DBE) { }
void selectDetails2(DBE) { }
void selectDetails3(DBE) { }
// Questions
DBE selectChoiceQ1 = choice(verEvidenceBox, "Q1:?", options, 1, 13,false)
DBE t1 = button(verEvidenceBox, "Show Details", selectDetails1)
t1 -> "left" -> "flush" -> selectChoiceQ1
t1 -> "top" -> "aligned" -> selectChoiceQ1
DBE selectChoiceQ2 = choice(verEvidenceBox, "Q2:?", options, 1, 13,false)
DBE t2 = button(verEvidenceBox, "Show Details", selectDetails2)
t2 -> "left" -> "flush" -> selectChoiceQ2
t2 -> "top" -> "aligned" -> selectChoiceQ2
DBE selectChoiceQ3 = choice(verEvidenceBox, "Q3:", options, 1, 13,false)
DBE t3 = button(verEvidenceBox, "Show Details", selectDetails3)
t3 -> "left" -> "flush" -> selectChoiceQ3
t3 -> "top" -> "aligned" -> selectChoiceQ3
DBE statusField = field(verEvidenceBox, "Status", "", 13, true)
show verEvidenceBox
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
I emphasize 1st and 4th rules; which together imply rule 5:you should never attach a DBE to a DBE that was declared after it. DBE dbeInvis1, dbeInvis2 dbeInvis1 = label(db, "abcde") // when you see the dialog, you end up changing this to "abcde "! beside db dbeInvis2 = label(db, "") left db dbeTopLeft = whatever dbeSubsequent = whatever dbeTopLeft ->"left" ->"aligned" ->dbeInvis1 dbeTopLeft ->"top" ->"aligned" ->dbeInvis1 dbeSubsequent ->"top" and "left" ->relative to dbeTopLeft dbeTroublePlacement = text(..) dbeTroublePlacement ->"top" ->relative to some real DBE dbeTroublePlacement ->"left" ->"aligned" ->dbeInvis2 realize(db) set(dbeInvis1, "")
|
Re: Problem with DBE placement Now its exactly the way I wanna. I you remember these rules! |